package gatech.cs3251.project4;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;


public class BootBroadcast extends BroadcastReceiver{

	private static final String CJDebug = "CHRIS";

	@Override
	public void onReceive(Context context, Intent intent) {
		Log.v(CJDebug, "In BootBroadcast onReceive");
		Intent startupIntent = null;
		try{
			Log.v(CJDebug, "Creating startupIntent");
			startupIntent = new Intent(context, Class.forName("gatech.cs3251.project4.FriendTracker"));
			Log.v(CJDebug, "Created startupIntent");
		}
		catch(Exception e)
		{
			Log.e("Exception:", e.getMessage());
		}
		Log.v(CJDebug, "Starting service");
		context.startService(startupIntent);
	}

}